package com.xiaoyu.lanling.feature.friend.model

import `in`.srain.cube.request.JsonData
import `in`.srain.cube.views.list.ListItemTypedBase
import `in`.srain.cube.views.list.ListPositionedItemBase
import com.xiaoyu.base.model.User

class FriendItem(position: Int, jsonData: JsonData) : ListPositionedItemBase(position) {
    val userJsonData = jsonData.optJson("user")
    val user = User.fromJson(userJsonData)
    val age = userJsonData.optInt("age")
    val desc = userJsonData.optString("desc")

    override fun getViewType(): Int {
        return 0
    }
}